package com.maiji.cloud.response.shopingmall;

import com.maiji.cloud.entities.login.UserInfo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import java.util.Date;
import org.apache.commons.lang.StringUtils;

@NoArgsConstructor
@Data
@Accessors(chain = true)
public class DistributionAgentApplyInfoResData {

	@ApiModelProperty(value = "申请ID")
	private String uuId;

	@ApiModelProperty(value = "用户姓名")
	private String name; // 用户姓名

	@ApiModelProperty(value = "用户手机号")
	private String phone; // 用户手机号

	@ApiModelProperty(value = "用户微信号")
	private String wxNum; // 用户微信号
	
	@ApiModelProperty(value = "是否申请代理")
	private Boolean isApply = false; // 是否申请代理

	@ApiModelProperty(value = "0：审核中，1审核通过，2审核拒绝")
	private Integer status; // 0：审核中，1审核通过，2审核拒绝
	
	@ApiModelProperty(value = "分销码")
	private String distributionNum;

	@ApiModelProperty(value = "申请时间")
    private Date inTime; //

	@ApiModelProperty(value = "审核时间")
    private Date examineTime; //

    @ApiModelProperty(value = "操作者ID")
    private String operatorId; //

    @ApiModelProperty(value = "操作者账号")
    private String operatorName; //

    @ApiModelProperty(value = "用户信息")
    private UserInfo userInfo; //
	
	private String realName;
	
	@ApiModelProperty(value = "分享码链接地址")
	private String url = "/?distributionNum=";
	
	 public String getUrl() {
        if (StringUtils.isBlank(realName)) return null;
        return realName + url +distributionNum;
    }
	
}
